Auto zero copy applied to a compute element within a systolic array

ABSTRACT

The present subject disclosure presents a hardware mechanism and usage model for using a compute element of a systolic array to handle messages from an RQ (Receive Queue) to SQ (Send Queue) without requiring a copy between queues and also minimizing the local processor&#39;s interaction with the send and receive queue hardware.

TECHNICAL FIELD

The subject disclosure relates generally to computer hardware and software design. In particular, the subject disclosure relates a zero copy pipeline applied to a compute element within a systolic array.

BACKGROUND

A basic pipeline usage module applies when a compute element is required to receive a message, modify some portion of it, and then send the message out to some other target (e.g., node) within the systolic array. The overhead of message passing burdens the processor as it interacts with hardware direct memory access (DMA) engines or message passing interfaces, reducing cycles available for other work. Delays in message passing may significantly reduce performance for highly optimized pipelines.

SUMMARY OF THE SUBJECT DISCLOSURE

The present subject disclosure presents a hardware mechanism and usage model for using a compute element of a systolic array to handle messages from an RQ (Receive Queue) to SQ (Send Queue) without requiring a copy between queues and also minimizing the local processor's interaction with the send and receive queue hardware.

In one exemplary embodiment, the present subject matter is a method for performing a zero copy to a compute element in a systolic array. The method includes placing an RQ and SQ in the same location in a queue memory, wherein the RQ and PQ have the same base address, entry size, and number of entries; receiving a message in the RQ in a given queue location; processing the message; and transmitting the message out using the SQ; wherein the given queue location is not used until the SQ transmits the message.

In another exemplary embodiment, the present subject matter is a method for performing a zero copy to a compute element in a systolic array. The method includes placing an RQ and SQ in the same location in a queue memory; receiving a message in the RQ in a given queue location; processing the message; and transmitting the message; wherein the given queue location is not used until the message is transmitted.

In yet another exemplary embodiment, the present subject matter is a system for or performing a zero copy to a compute element in a systolic array. The system includes a queue memory module, wherein a message is entered in a given queue location by a RQ, and wherein a corresponding SQ is associated with that given queue location.

BRIEF DESCRIPTION OF THE DRAWINGS

Various exemplary embodiments of this disclosure will be described in detail, wherein like reference numerals refer to identical or similar components or steps, with reference to the following figures, wherein:

FIG. 1 illustrates a four part process of handling queues in a compute element, according to an exemplary embodiment of the present subject disclosure.

DETAILED DESCRIPTION

The present subject disclosure presents techniques with optimize standard message passing using producer/consumer queues so as to minimize the local processor's interaction with the hardware. The hardware is aware of a send and receive queue pair being configured in the zero copy mode and changes its behavior to offload common data transfer operations from the processor to a dedicated hardware component.

The standard hardware design allows the type of operations that are described above but the present subject matter minimizes the processor's interaction with the hardware. The simplest example of utilizing the hardware in its standard operating mode to receive messages, modify all or a portion of that message, and then send the message out would be for the hardware to have a physically separate RQ and SQ located in the node's queue memory. In this example, the incoming message would populate an entry (or entries) in the RQ and the hardware would advertise this to the firmware. The firmware would respond by: checking that the targeted SQ has an entry available; reading the message out from the RQ into its local data memory; modifying the appropriate fields of the message within the local data memory; write the message to the given SQ; incrementing the SQ's producer index to send the message out. This is conventional way of handling messages. The present subject disclosure seeks to streamline the process and eliminate some of these steps.

There are many novel aspects of the mechanism discussed according to the present subject disclosure. For example, the present subject disclosure allows the local processor to configure the hardware to associate an RQ to an SQ and have them operate in zero copy mode. This allows the RQ and the SQ to share the same physical memory and eliminate the need for the firmware to copy messages and track the producer and consumer indexes for both the RQ and the SQ. This provides an operational performance improvement over standard methods. Many other advantages are also evident and appreciated by one having ordinary skill in the art.

The present subject disclosure defines an application where a node receives a message, modifies the message and then passes the modified version on to the next node. To use the no-copy features, the input and output messages should preferably have the same size and be one-to-one (i.e., one message is sent out per each received message).

In further describing the present subject matter, it is helpful to use a number of acronyms. They include: SQ=Send Queue; RQ=Receive Queue; CIDX=Consumer Index; PIDX=Producer Index. Send and Receive queues are standard consumer/producer circular queues where the valid entries are defined by the consumer and producer indices on the queue.

A zero copy configuration according to the present subject disclosure allows an SQ/RQ pair to overlay the same Queue Memory location, thereby removing the need for the firmware to copy the message during processing.

FIG. 1 depicts an exemplary four part operation of the zero copy process according to the present subject disclosure. The four parts are labeled as (Step 1) to (Step 4) from top to bottom. Starting with empty queues (Step 1), the SQ and RQ PIDX values and CIDX values are the same. Then, as Message A arrives, the RQ PIDX will increment (Step 2). This will enable scheduling of the processor to read and modify the entry in the queue, transforming Message A into Message A′. When the firmware processing is complete, it will increment the SQ PIDX to send Message A′ to the next node in the pipeline (Step 3). Finally, the hardware increments both the RQ and SQ CIDX when the SQ completes sending the message out (step 4).

The following steps are offloaded to the hardware to save processor cycles. (a) The RQ's CIDX is no longer updated by firmware. It is automatically updated by the hardware when the associated SQ's CIDX is updated after the message is transmitted. The RQ and SQ CIDX values should always be equal in this mode. (b) The processor no longer needs to check for available space in the SQ for sending a message. (c) The processor does not read or copy any portion of the message that remains constant. Large portions of the message may simply pass through the pipeline with zero processor cycles.

The subject matter described herein may be used in a variety of preferred ways, including, for example: (a) generation of a module level description of the mechanism; (b) low level, micro-architecture document showing block level flow diagrams for the implementation; (c) generation of Verilog RTL to implement the design; (d) block level simulation to verify the design and modify any issues found; (e) bring up and testing utilizing a hardware emulation platform; (f) integration into the top level design; (g) system level simulation; (h) standard back-end ASIC development process to produce the targeted device. Other variations are also possible.

Alternate uses of the subject disclosure are also within the scope of the present disclosure. For example, the present subject disclosure describes a fairly generic type of operation that would be commonly used by a compute node within a systolic array. The next level of detail (i.e., the node or application specific operation) would define how the processor is required to modify the incoming message prior to it being sent back out into the array to target the next targeted node. It is conceivable that additional hardware could be implemented to automate the message modifications based on standard lookup mechanisms, etc. and to also automate sending of the message after modifications.

The examples and methods described above are not limited to software or hardware, but may be either or a combination of both. If software, the method described is presented as code in a software program. If hardware, a processor is used to conduct the steps which are embedded within the hardware. The subject matter may also be a combination of software and hardware with one or more steps being embedded within a hardware component, and the other steps being part of a software program.

The illustrations and examples provided herein are for explanatory purposes and are not intended to limit the scope of the appended claims. It will be recognized by those skilled in the art that changes or modifications may be made to the above described embodiment without departing from the broad inventive concepts of the subject disclosure. It is understood therefore that the subject disclosure is not limited to the particular embodiment which is described, but is intended to cover all modifications and changes within the scope and spirit of the subject disclosure. 

1. A method for performing a zero copy to a compute element in a systolic array, comprising: placing an RQ and SQ in the same location in a queue memory, wherein the RQ and PQ have the same base address, entry size, and number of entries; receiving a message in the RQ in a given queue location; processing the message; and sending the message out using the SO; wherein the given queue location is not used until the SQ sends the message and any message existing in the RQ will not be overwritten by a new message until the SQ sends the message.
 2. The method of claim 1, wherein the SQ should always be available when an RQ message arrives.
 3. The method of claim 1, wherein a full RQ cannot receive another message until the SQ sends the next message.
 4. (canceled)
 5. The method of claim 1, wherein the RQ is automatically freed upon the SQ sending the message.
 6. The method of claim 1, wherein when the message is sent out, both the RQ and SQ consumer index is incremented.
 7. The method of claim 6, wherein when the RQ and SQ consumer index is incremented, the RQ can reuse the given queue location.
 8. A method for performing a zero copy to a compute element in a systolic array, comprising: placing an RQ and SQ in the same location in a queue memory; and receiving a message in the RQ in a given queue location; processing the message; and sending the message; wherein the given queue location is not used until the message is sent and any message existing in the RQ will not be overwritten by a new message until the SQ sends the message.
 9. The method of claim 8, wherein the SQ should always be available when an RQ message arrives.
 10. The method of claim 8, wherein a full RQ cannot receive another message until the SQ sends the next message.
 11. (canceled)
 12. The method of claim 8, wherein the RQ is automatically freed upon the SQ sending the message.
 13. The method of claim 8, wherein when the message is transmitted out, both the RQ and SQ consumer index is incremented.
 14. The method of claim 13, wherein when the RQ and SQ consumer index is incremented, the RQ can reuse the given queue location. 15-18. (canceled) 